<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>场地预留</title>
    <link rel="stylesheet" th:href="@{../static/css/component.css}">
    <link rel="stylesheet" th:href="@{../static/css/admin.css}">
    <link rel="stylesheet" th:href="@{../static/css/font-awesome.min.css}">
    <script th:src="@{../static/js/JQuery2.1.4.js}"></script>
    <script th:src="@{../static/js/common.js}"></script>
    <script th:src="@{../static/js/vue.2.6.js}"></script>
    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="rbody" id="apply">
    <div class="top">
        当前位置：后台<i class="fa fa-fw fa-angle-right"></i>场地预留
    </div>
    <div class="main">
        <div class="container-fluid">
            <div class="col-sm-12" id="right">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        搜索
                    </div>
                    <div class="panel-body">
                        <form role="form">
                            <div  class="form-inline">
                                <div class="form-group">
                                    <label>楼层</label>
                                    <select class="form-control" v-model="placestorey">
                                        <option></option>
                                        <option>一楼</option>
                                        <option>二楼</option>
                                        <option>三楼</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label>场地类型</label>
                                    <select class="form-control" v-model="placetype">
                                        <option></option>
                                        <option>篮球场</option>
                                        <option>羽毛球场</option>
                                        <option>乒乓球场</option>
                                        <option>台球场</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label>预约时间</label>
                                <div class="container-fluid">
                                    <div class="row">
                                        <div class="col-md-3" v-for="item in dateList">
                                            <input type="checkbox" v-model="item.active">{{item.date}}
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label>预约时间段</label>
                                <div class="container-fluid">
                                    <div class="row">
                                        <div class="col-md-3" v-for='(time,index) in timeList'>
                                            <input type="checkbox" v-model="time.active">{{time.time}}
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <button type="button" class="btn btn-default" @click="researchA()">开始搜索</button>
                            </div>
                        </form>
                    </div>
                </div>

                <div class="table-responsive">
                    <table class="table table-striped ">
                        <thead>
                        <tr>
                            <th>场地编号</th>
                            <th>场地所属楼层</th>
                            <th>场地类型</th>
                            <th>预约日期</th>
                            <th>可预约时间段</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody v-for='(placeapply,index) in showData'>
                            <tr>
                                <td>{{placeapply.place_no}}</td>
                                <td>{{placeapply.place_storey}}</td>
                                <td>{{placeapply.place_type}}</td>
                                <td>{{placeapply.apply_date | formatDate}}</td>
                                <td>{{placeapply.apply_period}}</td>
                                <td>
                                    <a @click="toPlaceApply(placeapply,1)" style="font-size: 16px"><i class="fa fa-asterisk" aria-hidden="true"></i>预留</a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <ul class="pagination">
                    <li><a>共{{countPage}}页</a></li>
                    <li><a @click="prePage()">&laquo;</a></li>
                    <li v-for="index in pageNum" :key="index" @click="turnPage(index)" :class="(currentPage == (index - 1)) ? 'active' : '' ">
                        <a><span>{{index}}</span></a>
                    </li>
                    <li><a @click="nextPage()">&raquo;</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>
<script th:src="@{../static/js/placeapply.js}"></script>
</body>
</html>